<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ include file="/WEB-INF/common/taglibs.jsp"%>
<html>
    <head>
        <link rel="icon" type="image/ico" href="<gameOfGhost:url constant="URL_IMG"/>favicon.ico" />
<%@ include file="/WEB-INF/common/meta.jsp"%>
        <title><spring:message code="header.title"/></title>
<%@ include file="/WEB-INF/common/css.jsp"%>
    <script type="text/javascript">
    function resetUsername(input) {
    	if (input.value=='${usernameDefaultValue}'){
    		   input.value='';
    	}
    }
    function resetPassword(input) {
        if (input.value=='${passwordDefaultValue}'){
               input.value='';
        }
    }
    </script>
    </head>
    <body class="login">
        <div id="wrapper">
            <div id="page">
                <div class="formLogin">
                    <div class="logoLogin">
                        <img src="<gameOfGhost:url constant="URL_IMG"/>logotipo.png" alt="Game of Ghost"/>
                    </div>
                    <p>
                        <span><spring:message code="login.instructionsText"/></span>
                        
                        
                        <c:if test="${!empty errorMessage}">
                            <br/>
                            <span style="color: #990000;"><spring:message code="${errorMessage}"/></span>
                        </c:if>
                    </p>
                    <form:form name="loginForm" id="loginForm" action="login.html" method="post" commandName="loginForm">
                        <form:input path="username" onfocus="resetUsername(this);"/>
                        <form:password path="password" showPassword="true" onfocus="resetPassword(this);"/>
                        <input type="submit" value="<spring:message code="login.button.submit"/>"/>
                    </form:form>
                </div>                  
            </div>
        </div>
    </body>
</html>